#ifndef __LIB_CMATRIX_H__
#define __LIB_CMATRIX_H__

/**
 * this file is used to generate the libcmatrix.a, which is used by AlignResultWrite
 * */
#include "soap_snp.h"


class CMatrix{
public:
	CMatrix(){};
	CMatrix(const char* refFileName, const char* snpFileName = NULL);
	~CMatrix();

	void update(unsigned int readLen, char* read, char* qual, 
			unsigned int pos, int hit, char strand, 
			const char* chrName);

	void write(const char* fileName);

private:
	ifstream _refFile;
	ifstream _dbsnpFile;
	static const int cmatrixSize = 256*256*4*4;
	ubit64_t _countMatrix[cmatrixSize];
	Genome* _genome;	
};


#endif /*__LIB_CMATRIX_H__*/

